package mail;

import java.sql.Blob;
import java.util.Date;

public class Mail {
	private long id;
	private User fromUser;
	private User toUser;
	private String title;
	private String content;
	private String attachmentName;
	private String attachmentType;
	private Blob attachmentContent;
	private Date sendTime;
	private Date receiveTime;
	private boolean read;
	private boolean fromDustbin;
	private boolean toDustbin;
	private boolean fromDelete;
	private boolean toDelete;
	
	
	
	public Mail() {
		super();
	}
	public Mail( User fromUser, User toUser, String title,
			String content, String attachmentName, String attachmentType,
			Blob attachmentContent, Date sendTime, Date receiveTime,
			boolean read, boolean fromDustbin, boolean toDustbin,
			boolean fromDelete, boolean toDelete) {
		super();	
		this.fromUser = fromUser;
		this.toUser = toUser;
		this.title = title;
		this.content = content;
		this.attachmentName = attachmentName;
		this.attachmentType = attachmentType;
		this.attachmentContent = attachmentContent;
		this.sendTime = sendTime;
		this.receiveTime = receiveTime;
		this.read = read;
		this.fromDustbin = fromDustbin;
		this.toDustbin = toDustbin;
		this.fromDelete = fromDelete;
		this.toDelete = toDelete;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public User getFromUser() {
		return fromUser;
	}
	public void setFromUser(User fromUser) {
		this.fromUser = fromUser;
	}
	public User getToUser() {
		return toUser;
	}
	public void setToUser(User toUser) {
		this.toUser = toUser;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getAttachmentName() {
		return attachmentName;
	}
	public void setAttachmentName(String attachmentName) {
		this.attachmentName = attachmentName;
	}
	public String getAttachmentType() {
		return attachmentType;
	}
	public void setAttachmentType(String attachmentType) {
		this.attachmentType = attachmentType;
	}
	public Blob getAttachmentContent() {
		return attachmentContent;
	}
	public void setAttachmentContent(Blob attachmentContent) {
		this.attachmentContent = attachmentContent;
	}
	public Date getSendTime() {
		return sendTime;
	}
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}
	public Date getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}
	
	public boolean isRead() {
		return read;
	}
	public void setRead(boolean read) {
		this.read = read;
	}
	public boolean isFromDustbin() {
		return fromDustbin;
	}
	public void setFromDustbin(boolean fromDustbin) {
		this.fromDustbin = fromDustbin;
	}
	public boolean isToDustbin() {
		return toDustbin;
	}
	public void setToDustbin(boolean toDustbin) {
		this.toDustbin = toDustbin;
	}
	public boolean isFromDelete() {
		return fromDelete;
	}
	public void setFromDelete(boolean fromDelete) {
		this.fromDelete = fromDelete;
	}
	public boolean isToDelete() {
		return toDelete;
	}
	public void setToDelete(boolean toDelete) {
		this.toDelete = toDelete;
	}
	
}
